package com.rayframework.core.annotation;


import java.lang.annotation.*;

/**
 * 注解合并
 * Spring中@AliasFor的阉割版，只能进行注解功能的合并
 * 使用本注解的时候，要在注解类上加上功能合并的注解
 *
 * @author LiaoYuXing-Ray
 * @version 1.0
 * @createDate 2023/9/21 9:32
 **/
@Target({ElementType.METHOD}) // 表示这个注解只能用于方法上
@Retention(RetentionPolicy.RUNTIME) // 指定该注解在运行时仍然有效
@Documented // 表示该注解将被包含在JavaDoc文档中
public @interface RayAliasFor {

    Class<?> firstAnnotation() default Annotation.class;
    Class<?> secondAnnotation() default Annotation.class;

//    Class<? extends Annotation> annotation() default Annotation.class;



    /**
     * Alias for {@link #attribute}.
     * <p>Intended to be used instead of {@link #attribute} when {@link #annotation}
     * is not declared &mdash; for example: {@code @AliasFor("value")} instead of
     * {@code @AliasFor(attribute = "value")}.
     */
//    @RayAliasFor("attribute")
//    String value() default "";

    /**
     * The name of the attribute that <em>this</em> attribute is an alias for.
     * @see #value
     */
//    @RayAliasFor("value")
//    String attribute() default "";

    /**
     * The type of annotation in which the aliased {@link #attribute} is declared.
     * <p>Defaults to {@link Annotation}, implying that the aliased attribute is
     * declared in the same annotation as <em>this</em> attribute.
     */
//    Class<? extends Annotation> annotation() default Annotation.class;

}
